

 const  quest = function(url,method,data,header){
    return new Promise(function(resolve,reject){
        wx.showLoading({
            title:"请求中"
        })
        wx.request({
            url: url,
            method:method,
            data:data,
            header,
            success:res=>{
                console.log(res)
                resolve(res)
            },
            fail:err=>{
                reject(err)
            },
            complete(){
                wx.hideLoading()
            }
        })
    })
}

module.exports =  {
    quest
}